#include"processbar.h"
#include<string.h>
#include<unistd.h>

const char* lable = "|/-\\";

void processbar()
{
    char bar[NUM];
    memset(bar,'\0',sizeof(bar));
    int len =strlen(lable);
    int cnt;
    for(cnt=0;cnt<=100;cnt++)
    {
        printf("[%-100s][%d%%][%c]\r",bar,cnt,lable[cnt%len]);
        fflush(stdout);
        usleep(100000);
        bar[cnt]=STYLE;
    }
    printf("\n");
}
